package com.suyx.job.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.suyx.job.entity.AnimalInfo;


/**
 * @Auther: suyx
 * @Date: 2018/10/18 0018 11:34
 * @Description:
*/
@Repository
public interface AnimalInfoRepository extends JpaRepository<AnimalInfo,Integer> ,JpaSpecificationExecutor<AnimalInfo> {

	@Query(value = "select * from animal_info where animal_info.status = '1' and animal_info.server_name = :serverName and animal_info.animal_name = :animalName  order by price",nativeQuery = true)
    List<AnimalInfo> findByServerNameAndAnimalName(@Param("serverName") String serverName,@Param("animalName") String animalName);
}
	